package com.yanglun.mvp;

import android.app.Application;
import android.test.ApplicationTestCase;
import android.util.Log;

import com.j256.ormlite.logger.Logger;
import com.yanglun.mvp.presenter.UserPresenter;
import com.yanglun.mvp.view.IUserView;

/**
 * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
 */
public class ApplicationTest extends ApplicationTestCase<Application> {

    public static String TAG = "MVPTest";
    public ApplicationTest() {
        super(Application.class);

    }

    public void testMVP1 (){
        new UserPresenter(new IUserView() {
            @Override
            public int getID() {
                return 0;
            }

            @Override
            public String getFristName() {
                return null;
            }

            @Override
            public String getLastName() {
                return null;
            }

            @Override
            public void setFirstName(String firstName) {
                Log.i(TAG,"FirstName:"+firstName);
            }

            @Override
            public void setLastName(String lastName) {
                Log.i(TAG,"LastName:"+lastName);
            }

            @Override
            public void setID(int id){
                Log.i(TAG,"ID:"+id);
            }

            @Override
            public void showToast(String str) {

            }
        }).loadUser(this.getContext(),2);


//        new UserPresenter(new MainActivity()).loadUser(this.getContext(),2);

    }

    public void testMVP2 (){

        Log.i("MVP","LastName2:");
    }

}